<%@ page import="org.hr.xtime.absence.Request" %>



<div class="fieldcontain ${hasErrors(bean: requestInstance, field: 'requestor', 'error')} required">
	<label for="requestor">
		<g:message code="request.requestor.label" default="Requestor" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="requestor" name="requestor.id" from="${org.hr.xtime.user.Employee.list()}" optionKey="id" required="" value="${requestInstance?.requestor?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: requestInstance, field: 'days', 'error')} ">
	<label for="days">
		<g:message code="request.days.label" default="Days" />
		
	</label>
	<g:select name="days" from="${org.hr.xtime.absence.Day.list()}" multiple="multiple" optionKey="id" size="5" value="${requestInstance?.days*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: requestInstance, field: 'status', 'error')} ">
	<label for="status">
		<g:message code="request.status.label" default="Status" />
		
	</label>
	<g:textField name="status" value="${requestInstance?.status}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: requestInstance, field: 'requestDate', 'error')} required">
	<label for="requestDate">
		<g:message code="request.requestDate.label" default="Request Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="requestDate" precision="day"  value="${requestInstance?.requestDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: requestInstance, field: 'approvalDate', 'error')} ">
	<label for="approvalDate">
		<g:message code="request.approvalDate.label" default="Approval Date" />
		
	</label>
	<g:datePicker name="approvalDate" precision="day"  value="${requestInstance?.approvalDate}" default="none" noSelection="['': '']" />
</div>

<div class="fieldcontain ${hasErrors(bean: requestInstance, field: 'approver', 'error')} required">
	<label for="approver">
		<g:message code="request.approver.label" default="Approver" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="approver" name="approver.id" from="${org.hr.xtime.user.Employee.list()}" optionKey="id" required="" value="${requestInstance?.approver?.id}" class="many-to-one"/>
</div>

